/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.openbrew.openbrewrf;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author chapmand
 */
@Entity
@Table(name = "LossLog")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "LossLog.findAll", query = "SELECT l FROM LossLog l"),
    @NamedQuery(name = "LossLog.findByLId", query = "SELECT l FROM LossLog l WHERE l.lId = :lId"),
    @NamedQuery(name = "LossLog.findByLBeerID", query = "SELECT l FROM LossLog l WHERE l.lBeerID = :lBeerID"),
    @NamedQuery(name = "LossLog.findByLCellar", query = "SELECT l FROM LossLog l WHERE l.lCellar = :lCellar"),
    @NamedQuery(name = "LossLog.findByLKeg", query = "SELECT l FROM LossLog l WHERE l.lKeg = :lKeg"),
    @NamedQuery(name = "LossLog.findByLBtl", query = "SELECT l FROM LossLog l WHERE l.lBtl = :lBtl"),
    @NamedQuery(name = "LossLog.findByLDate", query = "SELECT l FROM LossLog l WHERE l.lDate = :lDate"),
    @NamedQuery(name = "LossLog.findByLNotes", query = "SELECT l FROM LossLog l WHERE l.lNotes = :lNotes"),
    @NamedQuery(name = "LossLog.findByLAngelShare", query = "SELECT l FROM LossLog l WHERE l.lAngelShare = :lAngelShare")})
public class LossLog implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "LId")
    private Integer lId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "LBeerID")
    private int lBeerID;
    @Basic(optional = false)
    @NotNull
    @Column(name = "LCellar")
    private float lCellar;
    @Basic(optional = false)
    @NotNull
    @Column(name = "LKeg")
    private float lKeg;
    @Basic(optional = false)
    @NotNull
    @Column(name = "LBtl")
    private float lBtl;
    //@Basic(optional = false)
    //@NotNull
    @Column(name = "LDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date lDate;
    @Basic(optional = false)
    @NotNull
    @Size(min = 0, max = 250)
    @Column(name = "LNotes")
    private String lNotes;
    @Basic(optional = false)
    @NotNull
    @Column(name = "LAngelShare")
    private float lAngelShare;

    public LossLog() {
    }

    public LossLog(Integer lId) {
        this.lId = lId;
    }

    public LossLog(Integer lId, int lBeerID, float lCellar, float lKeg, float lBtl, Date lDate, String lNotes, float lAngelShare) {
        this.lId = lId;
        this.lBeerID = lBeerID;
        this.lCellar = lCellar;
        this.lKeg = lKeg;
        this.lBtl = lBtl;
        this.lDate = lDate;
        this.lNotes = lNotes;
        this.lAngelShare = lAngelShare;
    }

    public Integer getLId() {
        return lId;
    }

    public void setLId(Integer lId) {
        this.lId = lId;
    }

    public int getLBeerID() {
        return lBeerID;
    }

    public void setLBeerID(int lBeerID) {
        this.lBeerID = lBeerID;
    }

    public float getLCellar() {
        return lCellar;
    }

    public void setLCellar(float lCellar) {
        this.lCellar = lCellar;
    }

    public float getLKeg() {
        return lKeg;
    }

    public void setLKeg(float lKeg) {
        this.lKeg = lKeg;
    }

    public float getLBtl() {
        return lBtl;
    }

    public void setLBtl(float lBtl) {
        this.lBtl = lBtl;
    }

    public Date getLDate() {
        return lDate;
    }

    public void setLDate(Date lDate) {
        this.lDate = lDate;
    }

    public String getLNotes() {
        return lNotes;
    }

    public void setLNotes(String lNotes) {
        this.lNotes = lNotes;
    }

    public float getLAngelShare() {
        return lAngelShare;
    }

    public void setLAngelShare(float lAngelShare) {
        this.lAngelShare = lAngelShare;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (lId != null ? lId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof LossLog)) {
            return false;
        }
        LossLog other = (LossLog) object;
        if ((this.lId == null && other.lId != null) || (this.lId != null && !this.lId.equals(other.lId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.openbrew.openbrewrf.LossLog[ lId=" + lId + " ]";
    }
    
}
